#ifndef ANIMATIONPLAYERWIDGET_H
#define ANIMATIONPLAYERWIDGET_H

#include <QWidget>
#include "appGlobals.h"
#include "ui_animationplayerwidget.h"
class Document;
class AbstractGameObject;

class AnimationPlayerWidget : public QWidget
{
	Q_OBJECT

public:
	AnimationPlayerWidget(QWidget *parent = 0);

	void setVisualObject(QPointer<AbstractGameObject> visualObject);
private:
	Ui::AnimationPlayerWidget ui;
	int m_nCurrentAnimationFrame;
	QPointer<AbstractGameObject> m_visualObject;
	QTimer m_timer;
signals:
	void currentAnimationFrameChanged(int value);
public:
	void onDocumentChanged(QPointer<Document> doc);
private slots:
	void onTimer();
	void onToggleAnimationPlaying();
};

#endif // ANIMATIONPLAYERWIDGET_H
